import os


def get_data_by_csv(filename):
    data_list = []
    if os.path.exists(filename):
        file = open(filename, "r")
        for line in file:
            data = line.strip().split(",")
            data_list.append(data)
        return data_list
    else:
        raise RuntimeError("数据源不存在，请检查%s" % filename)

def get_data_by_mysql(filename):
    pass

def get_data_by_redis(key):
    pass

def get_data_by_server(filename):
    pass
